package com.niit.session9;

import java.util.Scanner;

public class GameChat {
	public static void main(String[] args) {
		String[] sw = {"SB","TMD","RNM","WDNMD"};
		Scanner sc = new Scanner(System.in);

		while (true) {
			String msg = sc.next();
			for (int i = 0; i < sw.length; i++) {
//				字符串替换，将字符串中存在的铭感词替换成***
				msg = msg.replace(sw[i], "***");	
			}
			System.out.println(msg);
		}
		
	}

}
